package com.europe.business.europebusiness.ui.activity;

import com.europe.business.europebusiness.R;
import com.europe.business.europebusiness.ui.bean.MainBusinessBean;
import com.europe.business.europebusiness.ui.net.ICompany;
import com.europe.business.europebusiness.ui.utils.NetUtils;
import com.europe.business.europebusiness.ui.utils.Utils;

import retrofit2.Call;



public class MainBusinessActivity extends ListActivity1<MainBusinessBean, MainBusinessBean.MainBusiness> {

    private int sector1Id;
    private int sector2Id;
    @Override
    protected void initView() {
        super.initView();
        setTitle(getString(R.string.info_select_city));
        setToolbarNavigationIcon(R.drawable.actionbar_back);
        sector1Id = getIntent().getIntExtra("sector1dataId", -1);
        sector2Id = getIntent().getIntExtra("sector2dataId", -1);
    }


    @Override
    protected void getData(final int pageNum, int pageSize) {
        if(pageNum == 1){
            showProgressDialog();
        }
        ICompany company = NetUtils.getRetrofit().create(ICompany.class);
        Call<MainBusinessBean> call = company.getMainBusiness(sector1Id, sector2Id, pageNum, pageSize, Utils.getSystemLanguage(this));
        call.enqueue(getCallback());
    }



}
